Index Parent

Listtree class


This Listtree class is a BETA version.

The Listtree class is used to manipulate trees of lists.

A Listtree object can be added ONLY to a Listview object at Listview object creation time.

Despite Listtree class is declaretd to be subclass of List class, just the attribute DropMark may be used wit a Listtree object and no List class method may be used.

Listtree is a subclass of Listtree.mcc so you must have Listtree.mcc in MUI:Libs/MUI to use it. Listtree.mcc is copyright of Klaus Melchior.

 

ATTRIBUTES
Name Type Class Note
ActiveID N ISGN This attribute indicates the active entry in a Listtree. The possible values are non negative integer, where 0 means no active entry, >0 means there is an active entry. This attribute is usefull in situation such as the active entry in a Listtree notifies a PageMode group.
ActiveName S ISGN This attribute indicates the active entry in a Listtree referred by name. If at list creation time (or in an Insert method) the name of an entry is specified, that name is used, otherwise, it is the the ActiveID. Any reference to an entry is made by this name.
DoubleClick B GN  
DragDropSort B IS  
DropType S G The attributes DropMark and DropType let you perform d&d operations.
DropType is one of:
  • Above
  • Below
  • Onto
  • Sorted
  • None
DropMark N G The attributes DropMark and DropType let you perform d&d operations.
DropMark is the position (Name) of the destination.
Format S I  
Quiet B IS  
Title S I  

 

METHODS
Name Parameters Note
Close [list],[tree]  
Insert <entry>,[list],[pred],[flags] Arguments:
  • entry - the entry to insert
  • list - in wich list to insert; a number or one of:
    • Root
    • Active [default]
  • pred - the node to add the entry after; a number or one of:
    • Active [default]
    • Head
    • Tail
  • flags - a combination of:
    • Open
    • List
    • Frozen
    • NoSign
Open [list],[tree] Arguments:
  • list - wich list to open; a number or one of:
    • Active [default]
    • Root
  • tree - wich node to open; a number or one of:
    • Active [default]
    • Parent
Remove [list],[tree],[flags] Arguments:
  • list - in wich list remove; a number or one of:
    • Root [default]
    • Active
  • tree - the node to remove; a number or one of:
    • Active [default]
    • All
    • Head
    • Tail
  • flags - none defined yet

 

Example

lv.class="listview"
lv.list="list"
 list.class="listtree"
 list.frame="inputlist"
 list.format="BAR,"
 list.title="Name|Phone"
  list.0="Friends"
  list.0.flags="close"
  list.0.list="friends"
   friends.0="Franco|0864833124"
   friends.1.type="tree"
   friends.1.flags="close"
   friends.1="University"
   friends.1.list="uni"
    uni.0="Ciccio"
    uni.1="Camillo"
    uni.2="Profs"
    uni.2.flags="list"
   friends.2="Roberto"
  list.1="Amiga shop in Empoli"